/**
 * 
 */
package com.pine.sunshineelder.bed.dto;

import java.time.LocalDateTime;

import com.pine.sunshineelder.common.entity.ElderBedEntity;
import com.pine.sunshineelder.common.entity.ElderEntity;

import lombok.Data;

/**
 * @author 卜涛元
 *
 */
@Data
public class ElderBedDto {
	private  String id;
	private String elderId;
	private String bedId;
	private String createUserId;
	private LocalDateTime createTime;
	private LocalDateTime endTime;
	private String leaveReason;

	public static ElderBedDto of(ElderBedEntity entity) {
		ElderBedDto dto = new ElderBedDto();
		dto.setBedId(entity.getBedId());
		dto.setCreateTime(entity.getCreateTime());
		dto.setCreateUserId(entity.getCreateUserId());
		dto.setElderId(entity.getElderId());
		dto.setEndTime(entity.getEndTime());
		dto.setId(entity.getId());
		dto.setLeaveReason(entity.getLeaveReason());
		return dto;
	}
}
